// compile: g++ -o vector vector.cc -std=c++11
// run: ./vector
#include <iostream>
#include <vector>
using namespace std;

void Print(vector<int>& v) {
  for (vector<int>::iterator it = v.begin(); it != v.end(); ++it) {
    cout << *it << " ";
  }
  cout << endl;
}
void ShowCapSize(vector<int>& v) {
  cout << "capacity=" << v.capacity() << endl;
  cout << "size=" << v.size() << endl;
}
void Test1() {
  vector<int> v(2, 0);
  ShowCapSize(v);
  v.push_back(0);
  ShowCapSize(v);
  v.shrink_to_fit();
  ShowCapSize(v);
  Print(v);
  v.emplace_back(10);
  v.emplace_back(20);
  ShowCapSize(v);
  Print(v);
}
void Test2() {}
int main() {
  Test1();
  Test2();
  return 0;
}
